﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Templates/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Permission.aspx.cs" Inherits="VIT.Web.Admin.Permission" %>

<%@ Register Assembly="VIT.Web.Controls" Namespace="VIT.Web.Controls" TagPrefix="VIT" %>
<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadContent" runat="server">
    <script type="text/javascript" src="<%=URLRoot %>Admin/Includes/VIT.js"></script>
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
    <form id="aspnetForm" runat="server">
        <div>           
            <asp:Panel ID="pnAlert" runat="server">
                <p class="msg info" id="lblThanhCong" runat="server" visible="false">Quyền đã được thiết lập.</p>
                <p class="msg done" id="lblThatBai" runat="server" visible="false">Không thể thiết lập quyền.</p>
	        </asp:Panel>
            <div class="toolbar">
                <VIT:Submit ID="Save" runat="server" Function="Permission_Save" ToolTip="Phân quyền" CssClass="icon-32-apply" BorderStyle="None" OnClick="Save_Click" OnClientClick="return hasCheck('role','Vui lòng chọn quyền');" />                
                <asp:Button ID="Cancel" runat="server" ToolTip="Hủy bỏ" CssClass="icon-32-cancel" BorderStyle="None" onclick="Cancel_Click"/>
            </div>
        </div>
        <div class="clr"></div>

        <div runat="server" id="divXuat">
            <%--<table>
                <asp:ListView ID="ListView" runat="server">
                    <LayoutTemplate>
                        <thead>
	                        <tr>
		                        <th width="2%">#</th>
		                        <th width="2%">
			                        <input type="checkbox" name="toggle" id="toggle" onclick="checkAll('toggle', 'itemCheckbox')"/>
	                            </th>                   
		                        <th>
                                    <asp:LinkButton ID="Description" runat="server" CommandName="Sort" CommandArgument="Description" Text="Chức năng" />
                                </th>
                                <th width="15%">
                                    <asp:LinkButton ID="Name" runat="server" CommandName="Sort" CommandArgument="Name" Text="Mã" />
                                </th>
	                        </tr>			
                        </thead>
                        <asp:PlaceHolder runat="server" ID="itemPlaceholder"></asp:PlaceHolder>
                    </LayoutTemplate>
                    
                    <ItemTemplate>
                        <tr class="row<%#Container.DataItemIndex%2 %>">
		                    <td align="center"><%#Container.DataItemIndex %></td>
                            <td><input type="checkbox" name="role" value="<%#Eval("Name") %>"/></td>
                            <td><%#Eval("Description") %></td>
                            <td><%#Eval("Name") %></td>
                        </tr>
                    </ItemTemplate> 
                </asp:ListView>
            </table>--%>
        </div>
    </form>
    <script type="text/javascript">
        $("#aside ul li#AccountList").addClass("submenu-active");
        checkByValues('role', '<%=this.roles %>');
    </script>    
</asp:Content>
